<template>
	<view class="page-index">
		<view class="userBox" :style="{ 'padding-top': menuButtonInfo.bottom + 10 + 'px' }">
			<view class="userItem" v-if="token">
				<image :src="userinfo.avatar" mode="" class="avatar"></image>
				<view class="userInfo">
					<view class="nickName">{{ userinfo.nickname }}</view>
					<view class="phone">
						<image src="/static/home/mobile.svg" mode="" style="width: 32rpx;height: 32rpx;"></image>
						{{ userinfo.mobile }}
					</view>
				</view>
			</view>
			<button class="userItem" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-else>
				<image src="/static/home/avatar.png" mode="" class="avatar"></image>
				<view class="userInfo">
					<view class="nickName">点击登录</view>
					<!-- <view class="phone">
						<image src="/static/home/mobile.svg" mode="" style="width: 32rpx;height: 32rpx;"></image>
						15555555555
					</view> -->
				</view>
			</button>
		</view>
		<view class="listBox">
			<view class="listItem" v-for="(item, index) in list" :key="index" @click="jump(item)">
				<image :src="item.icon" class="listImage"></image>
				<view class="itemValue">
					<view class="title">{{ item.title }}</view>
					<uni-icons type="right" size="20" color="#C9C9C9"></uni-icons>
				</view>
			</view>
			<view class="listItem" v-for="(item, index) in list2" :key="index" @click="logout()" v-if="token">
				<image :src="item.icon" class="listImage"></image>
				<view class="itemValue">
					<view class="title">{{ item.title }}</view>
					<uni-icons type="right" size="20" color="#C9C9C9"></uni-icons>
				</view>
			</view>
		</view>
	</view>
</template>

<script src="./page.js"></script>
<style>
page {
	background: #f5f5f5;
}
</style>
<style scoped lang="scss">
@import 'page.scss';
</style>
